<?php
    if ($_GET['delete'] == 'yes') {
        //Variablen
        $pmid = $_GET['pm_id'];

        if ($_GET['list'] == 'km') {
            $sql = "UPDATE project SET km_id = 0";
            mysql_query($sql);
        } else if ($_GET['list'] == 'pm') {
            $sql = "UPDATE project SET pm_id = 0";
            mysql_query($sql);
        }

        $sql = "DELETE FROM project_manager WHERE pm_id = " . $pmid;
        mysql_query($sql);
    }
?>
